package cn.edu.lingnan.service;

import cn.edu.lingnan.dao.PositionDao;
import cn.edu.lingnan.dao.PositionDaoMysqlImpl;
import cn.edu.lingnan.pojo.Position;

import java.util.List;

public class PositionServiceMysqlImpl implements PositionService{
    PositionDao positionDao=new PositionDaoMysqlImpl();

    @Override
    public boolean newPosition(Position post) {
        return positionDao.newPosition(post);
    }

    @Override
    public List<Position> findPositionAll() {
        return positionDao.findPositionAll();
    }

    @Override
    public List<Position> findPositionBySid(String _sid) {
        return positionDao.findPositionBySid(_sid);
    }

    @Override
    public List<Position> findPositionByCid(String _cid) {
        return positionDao.findPositionByCid(_cid);
    }

    @Override
    public List<Position> findPositionByPs(String _ps) {
        return positionDao.findPositionByPs(_ps);
    }

    @Override
    public boolean updatePsBySidAndCid(Position post) {
        return positionDao.updatePsBySidAndCid(post);
    }

    @Override
    public boolean deletePositionBySidAndCid(String _sid, String _cid) {
        return positionDao.deletePositionBySidAndCid(_sid,_cid);
    }
}
